package BehaviorDesignPattern.MediatorPattern;


// 具体组件1
class Component1 extends Component {
    public Component1(Mediator mediator) {
        super(mediator);
    }

    public void doA() {
        System.out.println("组件1执行A操作。");
        mediator.notify(this, "A");
    }
    public void doC() {
        System.out.println("组件1执行C操作。");
    }
}